package com.cn.web.user.vo.member;

import com.cn.devison.Devision2Util;
import com.cn.dic.annoations.DicAnnoations;
import com.cn.dic.serialize.DicSerialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * description: MemberUserInfoEdit <br>
 * date: 23.7.26 10:17 <br>
 * author: cn_yaojin <br>
 * version: 1.0 <br>
 */
@Setter
@Getter
@Accessors(chain = true)
@ApiModel(value = "会员基础信息")
public class MemberUserInfoEdit {

    //@JsonSerialize(using = JsonSerializerEncode.class)
//    @JsonDeserialize(using = JsonSerializerDecode.class)
    @ApiModelProperty(value = "手机号")
    private String phone;

    //@JsonSerialize(using = JsonSerializerEncode.class)
//    @JsonDeserialize(using = JsonSerializerDecode.class)
    @ApiModelProperty(value = "用户名")
    private String accountName;


    //@JsonSerialize(using = JsonSerializerEncode.class)
//    @JsonDeserialize(using = JsonSerializerDecode.class)
    @ApiModelProperty(value = "头像")
    private String photo;

    //@JsonSerialize(using = JsonSerializerEncode.class)
//    @JsonDeserialize(using = JsonSerializerDecode.class)
    @ApiModelProperty(value = "昵称")
    private String nickName;

    //@JsonSerialize(using = JsonSerializerEncode.class)
//    @JsonDeserialize(using = JsonSerializerDecode.class)
    @ApiModelProperty(value = "性别")
    private String gender;

    //@JsonSerialize(using = JsonSerializerEncode.class)
//    @JsonDeserialize(using = JsonSerializerDecode.class)
    @DicAnnoations(dicType = "gender")
    @JsonSerialize(using = DicSerialize.class)
    @ApiModelProperty(value = "性别")
    private String genderTxt;

    //@JsonSerialize(using = JsonSerializerEncode.class)
//    @JsonDeserialize(using = JsonSerializerDecode.class)
    @ApiModelProperty(value = "出生日期")
    private String birthday;

    //@JsonSerialize(using = JsonSerializerEncode.class)
//    @JsonDeserialize(using = JsonSerializerDecode.class)
    @ApiModelProperty(value = "所在城市编码")
    private String areaCode;

    //@JsonSerialize(using = JsonSerializerEncode.class)
//    @JsonDeserialize(using = JsonSerializerDecode.class)
    @ApiModelProperty(value = "所在城市")
    private String areaCodeTxt;

    //@JsonSerialize(using = JsonSerializerEncode.class)
//    @JsonDeserialize(using = JsonSerializerDecode.class)
    @ApiModelProperty(value = "职业")
    private String workPost;

    public String getGenderTxt() {
        return gender;
    }

    public String getAreaCodeTxt() {
        return Devision2Util.getTxt(areaCode);
    }
}
